import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import *

testCase="DBshop014_商品分类删除分类"
firefox=openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
DBshopEnterMenu3(firefox,"商品管理","管理分类","商品分类")

firefox.find_element_by_xpath("//td[contains(.,'商品分类测试')]/following-sibling::td[4]/a[3]").click()
firefox.switch_to_alert().accept()

try:
    firefox.find_element_by_xpath("//td[contains(.,'商品分类测试')]")
    writeLog("%s 测试失败"%testCase)
    getPhoto(firefox)
except:
    writeLog("%s 测试通过" % testCase)